package com.wesley.builder.house;

/**
 * <h1>指挥者</h1>
 *
 * @Date: 2021/8/13
 */
public class DirectHouse {

    private final HouseBuilder houseBuilder;

    public DirectHouse(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public House buildHouse() {
        houseBuilder.buildBasic();
        houseBuilder.buildWalls();
        houseBuilder.buildRoofed();
        return houseBuilder.build();
    }

}
